function isDevice() {
  var u = navigator.userAgent
  if (u.indexOf('Android') > -1 ||
    u.indexOf('Linux') > -1 ||
    u.indexOf('iPhone') > -1 ||
    u.indexOf('Windows Phone') > -1 ||
    u.indexOf('iPod') > -1 ||
    u.indexOf('SymbianOS') > -1) {
    return true
  } else {
    return false
  }
}

/* eslint-disable no-undef */
function isOnline() {
  // var online = navigator.connection.type
  // if (typeof Connection === 'undefined') {
  //   return false
  // }
  // if (online === window.Connection.NONE || online === window.Connection.UNKNOWN) {
  //   return false
  // } else {
  //   return true
  // }
  return true
}
export { isDevice, isOnline }
